home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Telnet 2.6.1d1 4⁄26⁄94 Folder / source / network / InternalEvents.h < prev    next >
Text File  |  1993-11-01  |  2KB  |  59 lines

  1. /* first we have all of the neat network defines.  Most of them are used by
  2.     the DoNetEvents loop, as the custom network events */
  3.  
  4. /* the different types of network events... */    
  5. #define USERCLASS    1                /* user defined events */
  6. #define SCLASS        8
  7. #define CONCLASS    16                /* this has all of the connection events */
  8.  
  9. /* these are all of the connection events */
  10. #define CONOPEN        1        /* connection has opened, CONCLASS */
  11. #define CONDATA     2       /* there is data available on this connection */
  12. #define CONCLOSE    3        /* the other side has closed its side of the connection */
  13. #define CONFAIL        4        /* connection open attempt has failed */
  14.  
  15. /* all of the user-defined network events */
  16. #define UDPDATA        1        /* UDP data has arrived on listening port, USERCLASS */
  17. #define DOMAIN_DONE    2        /* domain name ready/failed */
  18. #define FTPCOPEN    20        /* FTP command connection has opened */
  19. #define FTPCLOSE    21        /* FTP command connection has closed */
  20. #define FTPBEGIN    22
  21. #define FTPEND        23        /* FTP transfer ending */
  22.  
  23. #define FTPACT        2        /* FTP transfer is active, keep sending */
  24. #define RCPACT        4        /* rcp is active, needs CPU time */
  25. #define RETRYCON    5        /* retry connection packet, might be lost */
  26. #define CLOSEDONE    6        /* Close completion routine has been called (for Mac Drivers only) */
  27. #define UDATA        7        /* BYU mod - client ftp active */
  28.  
  29. #define    RG_REDRAW    128
  30.  
  31. /* next two are for keeping track of pasting to session */
  32. #define PASTELEFT    130        /* UserEvent, PASTELEFT causes pasteText */
  33.  
  34. #define HFTP        21        /* BYU mod: for ftp stuff */
  35.  
  36. //    Port types (determines what routine should be called when data arrives on port)
  37. #define    NO_TYPE        -1
  38. #define    CNXN_TYPE    0
  39. #define    UDATA_TYPE    1
  40. #define    PDATA_TYPE    2
  41. #define    PFTP_TYPE    3
  42.  
  43. /*************************************************************************/
  44. /*  event queue
  45. *   records what happens, especially errors, and keeps them for any
  46. *   routines that poll, looking for what happened.
  47. *   Eight event classes are masked in the event class byte.
  48. *    There can be 256 event types per class.
  49. *   The data field is handled differently by each event type.
  50. */
  51. typedef struct internal_event {
  52.     Ptr                qLink;
  53.     short            qType;
  54.     short            eclass;        /* class, defined in netevent.h */
  55.     short            event;        /* which event */
  56.     short            data1;
  57.     long            data2;        
  58. }    internal_event;
  59.